#ifndef cosm_h
#define cosm_h

#include "Arduino.h"
#include "gsm.h"
#include "TR.h"
#include "controller.h"

class COSM : public Controller {
public:
  COSM(GSM& gsm, TR tr1, TR tr2);
  
  void setCommand(String command);
  boolean check();
  String getStatus();  
private:
  GSM& _gsm;
  TR _tr1;
  TR _tr2;

  long _cosmPeriodMinutes;
  long _lastCosmTs;
  long _currTs;  


  void _cosmSend(String feed, Sensor& s, Relay& r);

};

#endif


